#ifndef SENSORLIST_H
#define SENSORLIST_H

#include <QObject>
#include "s401model.h"
#include "sensormodel.h"
#include <QTimer>


class SensorList : public QObject
{
    Q_OBJECT
public:
    explicit SensorList(QObject *parent = nullptr);

    Q_INVOKABLE const QString &getName() const;
    Q_INVOKABLE void setName(const QString &newName);

    S401Model *getS401m() const;
    void setS401m(S401Model *newS401m);

    Q_INVOKABLE int getSensorCount();
    Q_INVOKABLE SensorModel *getSensor(int index) const;
public slots:
    void update();

private:
    QString name;
    S401Model *s401m;
    QList<SensorModel*> sensor;

    SensorModel *sm1;
    SensorModel *sm2;
    SensorModel *sm3;
    SensorModel *sm4;


    Q_PROPERTY(QString name READ getName WRITE setName NOTIFY nameChanged)

    Q_PROPERTY(S401Model *s401m READ getS401m WRITE setS401m NOTIFY s401mChanged)

    QTimer *timer;

signals:

    void nameChanged();

    void s401mChanged();
};

#endif // SENSORLIST_H
